var express = require('express');
var router = express.Router();
var db = require("../monmgoDB/db")
/* 列表查询 */
router.get('/deleteData', function (req, res, next) {
    var id = req.query.id;
    db.findByIdAndDelete(id, function (err) {
        if (err) {
            res.send({
                code: 400,
                msg: "删除失败！"
            })
        } else {
            res.send({
                code: 200,
                msg: "删除成功！"
            })
        }
    })
});

module.exports = router;
